<template>
  <div class="win10-datepanel">
    <div style="display: flex">
      <p>父组件initial初始值：</p>
      <input v-model.number="initial" style="fone-size: 30px"/>
    </div>
    <count :initial="initial" :tplArr="tplArr" @child-add="change"></count>
  </div>
</template>

<script>
import { reactive, ref, onMounted, toRefs, toRef, watchEffect, } from 'vue';
import count from './components/count'

const tplObj = {test: 4444}
export default {
  name: "Win10DatePanel",
  components: {count},
  setup() {
    const initial = ref(100)
    const tplArr = reactive([{val: 1}, {val: 2}])
    const change = (value) => {
      initial.value = value
    }
    setTimeout(() => {
      tplArr[0].val = 10
    }, 2000)

    return {
      initial,
      change,
      tplArr
    }
  }
};
</script>

<style lang="scss" scoped>
.win10-datepanel {
  height: 100vh;
  background-color: white;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  .panel-box {
    display: flex;
    margin-top: 10em;
    justify-content: center;
  }
  div {
    margin-bottom: 20px;
  }
  // align-items: center

  * {
    box-sizing: border-box;
  }
}
</style>
